home *** CD-ROM | disk | FTP | other *** search
/ QuickTime - The Beta Release / QuickTime - The Beta Release.iso / Programming Stuff / vdig sample / RO364.h < prev    next >
Text File  |  1991-08-26  |  7KB  |  166 lines

  1. /*
  2.     File:        RO364.h
  3.  
  4.     Contains:    xxx put contents here xxx
  5.  
  6.     Written by:    xxx put writers here xxx
  7.  
  8.     Copyright:    © 1991 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     This file is used in these builds: Warhol
  11.  
  12.     Change History (most recent first):
  13.  
  14.         <13>     8/20/91    CK        Add 3 new calls for async multi buffering, fix input selection
  15.                                     for PAL, add a couple of globals
  16.         <12>      5/5/91    CK        add set and get pllFiltertype (for 24stv)
  17.         <11>      5/5/91    CK        move to components.h, remove unused stuff, add bumpOne.
  18.         <10>      5/2/91    CK        Add haveSTV global and increment code rev.
  19.          <9>      5/1/91    CK        Add 5 new source selection routines, add inputSource global
  20.          <8>     4/17/91    CK        add code revision constant to be used in GetVersion (lo word)
  21.          <7>     4/16/91    CK        add a couple of routines, delete unused routines, add a couple
  22.                                     of globals, remove outdated header files
  23.          <6>     3/26/91    CK        add playthru routines, change getauxbuffer i/f, add playthru
  24.                                     state and auxpixmap to globals
  25.          <5>     2/24/91    CK        Change ThingError to VideoDigitizerError, add 2 new mask calls
  26.                                     (v1.0d3)
  27.          <4>     2/23/91    CK        Add new calls (v1.0d3), add exact parameter to SetDigitizerRect,
  28.                                     change GetMaskgDevice to GetMaskPixMap.
  29.          <3>     2/18/91    CK        fixed some prototypes, added some globals
  30.          <2>     2/13/91    CK        Change to new header files (from DIGI & Matrix), add gdh to
  31.                                     thing globals
  32.  
  33.     To Do:
  34. */
  35.  
  36. /* RO364 Unique R0364.h */
  37.  
  38. /* 
  39.     File name:     RO364.h 
  40.     Function:    Header file for a RO364 digitizer thing
  41.     History:    1/23/91    New today
  42. */
  43.  
  44. #ifndef _RO364_
  45. #define    _RO364_
  46.  
  47. #ifndef _MoviesRoutines_
  48. /* #include "Movies Routines.h" */
  49. #endif
  50.  
  51. #ifndef _videodigitizer_
  52. #include "video digitizer.h"
  53. #endif
  54.  
  55. /* revision constants */
  56. #define kCodeRev            11
  57.  
  58. /* Constants unique to Touchstone */
  59.  
  60. #define kMaxHorNTSCIn        640
  61. #define kMaxVerNTSCIn        480
  62. #define kMaxHorPALIn        768
  63. #define kMaxVerPALIn        576
  64. #define kVerBlank            20
  65.  
  66. typedef struct {
  67.     short            top;
  68.     short            left;
  69.     short            pixelSize;
  70.     Boolean            doneState;            /* 0 off or in progress, 1 done */
  71. } VdigBufferLocal;
  72.  
  73. typedef struct {
  74.     short            count;
  75.     VdigBufferLocal list[1];
  76. } VdigBufferLocalList;
  77.  
  78. typedef VdigBufferLocalList *VdigBufferLocalListPtr, **VdigBufferLocalListHandle;
  79.  
  80. typedef struct {
  81.     short             refNum;             /* RO364 card reference number */
  82.     GDHandle        gdh;
  83.     char            slot;
  84.     PixMapHandle    pixMapHndl, destPixMapHndl;
  85.     PixMapHandle    auxBufferPixMapHandle;
  86.     Rect            maxSrcRect;
  87.     Rect            activeRect;
  88.     Rect            vBlankRect;
  89.     Rect            digiRect;
  90.     Rect            destRect;
  91.     Ptr                baddr;
  92.     short            rowBytes;
  93.     short            pixelSize;
  94.     MatrixRecord    matrix;
  95.     short            state;
  96.     short            playThruState;
  97.     long            inputFlags;
  98.     long            outputFlags;
  99.     unsigned short    contrast;
  100.     unsigned short    hue;
  101.     unsigned short    brightness;
  102.     unsigned short    saturation;
  103.     unsigned short    blackLevel;
  104.     unsigned short  whiteLevel;
  105.     CntrlParam        gpb;
  106.     short            top;
  107.     short            left;
  108.     PixMapHandle    nextDest;
  109.     Point            nextDestPt;
  110.     short            inputSource;    /* zero based, 0 = composite, 1 = sVideo */
  111.     short            inputStd;
  112.     Boolean            haveSTV;        /* false = ro364, true = ro24stv */
  113.     Boolean            bumpOne;        /* true if destination top was odd and 1 added to it */
  114.     VdigBufferLocalListHandle    bufferList;
  115.     
  116. } Globals;
  117.     
  118. pascal ComponentResult RO364Thing( ComponentParameters *params, Handle storage );
  119.  
  120. /* Internal thing prototypes - called with CallMyFunction from digi thing dispatcher */
  121.  
  122. pascal VideoDigitizerError    GetMaxSrcRect(Handle storage, short inputStd, Rect *maxSrcRect);
  123. pascal VideoDigitizerError    GetActiveSrcRect(Handle storage, short inputStd, Rect *activeSrcRect);
  124. pascal VideoDigitizerError    SetDigitizerRect(Handle storage, Rect *digitizerRect);
  125. pascal VideoDigitizerError    GetDigitizerRect(Handle storage, Rect *digitizerRect);
  126. pascal VideoDigitizerError    GetVBlankRect(Handle storage, short inputStd, Rect *vBlankRect);
  127. pascal VideoDigitizerError    SetContrast(Handle storage, unsigned short *contrast);
  128. pascal VideoDigitizerError    SetHue(Handle storage, unsigned short *hue);
  129. pascal VideoDigitizerError    SetBrightness(Handle storage, unsigned short *brightness);
  130. pascal VideoDigitizerError    SetSaturation(Handle storage, unsigned short *saturation);
  131. pascal VideoDigitizerError  SetBlackLevel(Handle storage, unsigned short *blackLevel);
  132. pascal VideoDigitizerError  SetWhiteLevel(Handle storage, unsigned short *whiteLevel);
  133. pascal VideoDigitizerError    GetContrast(Handle storage, unsigned short *contrast);
  134. pascal VideoDigitizerError    GetHue(Handle storage, unsigned short *hue);
  135. pascal VideoDigitizerError    GetBrightness(Handle storage, unsigned short *brightness);
  136. pascal VideoDigitizerError    GetSaturation(Handle storage, unsigned short *saturation);
  137. pascal VideoDigitizerError  GetBlackLevel(Handle storage, unsigned short *blackLevel);
  138. pascal VideoDigitizerError  GetWhiteLevel(Handle storage, unsigned short *whiteLevel);
  139. pascal VideoDigitizerError    GetVideoDefaults(Handle storage,
  140.                             unsigned short *blackLevel, unsigned short *whiteLevel,
  141.                             unsigned short *brightness, unsigned short *hue, unsigned short *saturation,
  142.                             unsigned short *contrast, unsigned short *sharpness);
  143. pascal VideoDigitizerError    GrabOneFrame(Handle storage);
  144. pascal VideoDigitizerError    GetMaxAuxBuffer(Handle storage, PixMapHandle *pm, Rect *r);
  145. pascal VideoDigitizerError    GetDigitizerInfo(Handle storage, DigitizerInfo *info);
  146. pascal VideoDigitizerError    GetCurrentFlags(Handle storage, long *inputCurrentFlag, long *outputCurrentFlag);
  147. pascal VideoDigitizerError    SetPLLFilterType(Handle storage, short pllType);
  148. pascal VideoDigitizerError    GetPLLFilterType(Handle storage, short *pllType);
  149. pascal VideoDigitizerError    SetPlayThruDestination(Handle storage, PixMapHandle dest, Rect *destRect, MatrixRecord *m, RgnHandle mask);
  150. pascal VideoDigitizerError    SetPlayThruOnOff(Handle storage, short state);
  151. pascal VideoDigitizerError    GetPlayThruDestination(Handle storage, PixMapHandle *dest, Rect *destRect,
  152.                                 MatrixRecord *m, RgnHandle *mask);
  153. pascal VideoDigitizerError    GrabOneFrameAsync(Handle storage, Boolean bufferingOn, PixMapHandle nextDest, Point nextDestPt);
  154. pascal long                 Done(Handle storage);
  155. pascal VideoDigitizerError    GetNumberOfInputs(short *inputs);
  156. pascal VideoDigitizerError    GetInputFormat(short input, short *format);
  157. pascal VideoDigitizerError    SetInput(Handle storage, short input);
  158. pascal VideoDigitizerError    GetInput(Handle storage, short *input);
  159. pascal VideoDigitizerError    SetInputStandard(Handle storage, short inputStandard);
  160. pascal VideoDigitizerError    SetupBuffers(Handle storage, VdigBufferRecListHandle bufferList);
  161. pascal VideoDigitizerError    GrabOneFrameAsync2(Handle storage, short buffer);
  162. pascal long                    Done2(Handle storage, short buffer);
  163.  
  164. #endif    _RO364_
  165.  
  166.